﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AccountManager.ascx.cs" Inherits="BONSAI.Admin.UC.AccountManager" %>
<table cellpadding="0" cellspacing="0" width="100%" style="padding-top: 10px; padding-left: 8px;
    padding-right: 8px;">
    <tr>
        <td style="padding-left: 10px; padding-right: 20px;">
            <img src="Image2/lua.png" /> <span style="font-weight: bold; font-size: 10pt;">Quản lý người dùng</span>
            <hr />
        </td>
    </tr>
     <tr>
     <td style="height: 10px;">
     
     </td>
    </tr>
    <tr>
        <td style="padding-left: 20px;">
            <table cellspacing="0" cellpadding="0" width="100%">
                <tr>
                    <td align="right" style="height: 28px">
                        Tên đăng nhập: &nbsp;</td>
                    <td style="height: 28px">
                        <asp:TextBox ID="txtten" CssClass="textboxA" runat="server" Width="200px"></asp:TextBox>&nbsp;
                        <span style="color: #ff3300">*</span></td>
                </tr>
                <tr>
                    <td align="right" style="height: 28px">
                        Mật khẩu: &nbsp;</td>
                    <td style="height: 28px">
                        <asp:TextBox ID="txtpass" TextMode="Password" CssClass="textboxA" runat="server"
                            Width="200px"></asp:TextBox>&nbsp; <span style="color: #ff3300">*</span></td>
                </tr>
                <tr>
                    <td align="right" style="height: 28px">
                        Nhập lại mật khẩu: &nbsp;</td>
                    <td style="height: 28px">
                        <asp:TextBox ID="txtrepass" TextMode="Password" CssClass="textboxA" runat="server"
                            Width="200px"></asp:TextBox>&nbsp; <span style="color: #ff3300">*</span></td>
                </tr>
                <tr>
                    <td align="right" style="height: 28px">
                        Quyền: &nbsp;</td>
                    <td style="height: 28px">
                        <asp:DropDownList CssClass="drpA" ID="dropquyen" runat="server">
                            <asp:ListItem Value="0">User</asp:ListItem>
                            <asp:ListItem Value="1">Admin</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                
                <tr>
                    <td align="right">
                        <span style="color: #ff3300">(*) <span style="color: #000000">Những trường được yêu cầu&nbsp;&nbsp;&nbsp; </span></span>
                    </td>
                    <td>
                        <br />
                        <asp:Button ID="btadd" CssClass="buttonA" runat="server" Text="Tạo người dùng" OnClick="btadd_Click" />&nbsp;
                        </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr style="color: #000000">
        <td>
            <hr />
        </td>
    </tr>
    
    <tr style="color: #000000">
        <td valign="top" align="left">
            <fieldset><legend style="color: Blue;">Danh sách người dùng</legend>
              <br />
                <asp:GridView Width="100%" ID="GridView1" runat="server" AutoGenerateColumns="False"
                    CellPadding="4" ForeColor="Black" EmptyDataText="Không tìm thấy dữ liệu!"
                    DataKeyNames="UserName" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
                    BorderWidth="1px" AllowPaging="True" PageSize="20" 
                    OnRowDeleting="GridView1_RowDeleting" >
                    <HeaderStyle HorizontalAlign="Center" />
                    <Columns>
                        
                        <asp:TemplateField HeaderText="T&#234;n đăng nhập">
                           
                            <ItemTemplate>
                                <%# Eval("UserName")%>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="Quyền Admin">                           
                            <ItemTemplate>
                               
                               <asp:CheckBox Enabled="false" runat="server" Checked='<%# Eval("Role") %>' />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                                              
                        <asp:CommandField HeaderImageUrl="~/Admin/ImageAdmin/bookmark-missing.png" DeleteText="X&#243;a" ShowDeleteButton="True" />
                       
                       
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                    <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                    <HeaderStyle BackColor="Gray" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
                </asp:GridView>
            </fieldset>
        </td>
    </tr>
       <tr style="color: #000000">
        <td style="height: 20px;">
    
        </td>
    </tr>
    
</table>
